﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp6
{
    internal class Button
    {
        public delegate void OnClickDelegate();
        public OnClickDelegate OnClick = null;
        public void Click()
        {
            Console.WriteLine("按钮被点击了");
            if (OnClick != null)
            {
                OnClick();
            }
        }
    }
}
